/*
 * @Author: 陈媛洁
 * @Date: 2020-03-04
 *
 * 车型管理
 */

import { createAPI } from '@/utils/request'
import da from 'element-ui/src/locale/lang/da'
// 获取货物类型分页数据
export const getTruckPage = data => createAPI(`/truck/page`, 'get', data)
// 添加车辆
export const addTruck = data => createAPI(`/truck`, 'post', data)
// 统计车辆
export const getVehicleStatic = data => createAPI(`/count`, 'get', data)
// 获取车辆详情
export const getVehicleDetail = data => createAPI(`/truck/${data}`, 'get', data)
// 更新车辆信息
export const getVehicleDetailNew = (id, data) => createAPI(`/truck/${id}`, 'put', data)
// 获取车辆行驶证信息
export const getVehicleLicense = data => createAPI(`/truck/${data}/license`, 'get', data)
// 保存车辆行驶证信息
export const getVehicleLicenseNew = (id, data) => createAPI(`/truck/${id}/license`, 'post', data)
// 获取未绑定车辆的司机
export const getUnbindingDrivers = data => createAPI(`/unBindingDrivers/`, 'get', data)
// 获取绑定司机
export const getBindingDrivers = data => createAPI(`/bindingDrivers/${data}`, 'get', data)
// 启用车辆
export const getVehicleWorking = data => createAPI(`/enable/${data}`, 'put', data)
// 禁用车辆
export const getVehicleDisable = data => createAPI(`/disable/${data}`, 'put', data)
// 车辆绑定司机
export const addVehicleBinding = data => createAPI(`/truck/truckDrivers`, 'post', data)
// 获取司机数据
export const getDriver = data => createAPI(`/driver/${data}`, 'get')
// 获取司机驾驶证数据
export const getDriverLicense = data => createAPI(`/driverLicense/${data}`, 'get')
// 更新员工信息
export const updateDriver = (id, data) => createAPI(`/driver/${id}`, 'put', data)
// 更新驾驶证信息
export const updateDriverLicense = data => createAPI(`/driverLicense`, 'post', data)
// 分页查询排班
export const getWorkScheduling = data => createAPI(`/work-schedulings`, 'get', data)
// 分页工作模式
export const getWorkPattern = data => createAPI(`/work-patterns/page`, 'get', data)
// 添加工作模式
export const addWorkPattern = data => createAPI(`/work-patterns`, 'post', data)
// 删除工作模式
export const delWorkPattern = data => createAPI(`/work-patterns/${data}`, 'delete')
// 列表工作模式
export const listWorkPattern = data => createAPI(`/work-patterns/all`, 'get')
// 人工调整
export const updateWorkScheduings = data => createAPI(`/work-schedulings`, 'put', data)
// 配置车辆
export const configureVehicle = data => createAPI(`/driver/truckDrivers`, 'POST', data)

